//package com.lb.controller;
//
//import com.lb.api.ApiResult;
//import com.lb.dao.mysql.entity.Person;
//import com.lb.service.PersonService;
//import com.lb.service.RedisService;
//import lombok.AllArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.context.ApplicationContext;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * 功能
// *
// * @author libin
// * @since 2.3.3
// */
//@RestController
//@Slf4j
//@AllArgsConstructor
//public class RedisController {
//
//    private final RedisService redisService;
//
//    private final PersonService personService;
//
//    @GetMapping("/set/key")
//    public ApiResult<?> setKey(@RequestParam String key) {
//        redisService.setKey(key);
//        return ApiResult.success();
//    }
//
//    @GetMapping("/get/key")
//    public ApiResult<?> getKey(@RequestParam String key) {
//        return ApiResult.success(redisService.getKey(key));
//    }
//
//    @GetMapping("/cache/test")
//    public ApiResult<Person> cacheTest(@RequestParam Integer key) {
//        Person person = personService.cacheTest(key);
//        return ApiResult.success(person);
//    }
//
//    @GetMapping("/test")
//    public ApiResult<?> test(HttpServletRequest httpServletRequest) {
//        return ApiResult.success();
//    }
//}